package com.leyou.item.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leyou.item.dto.SpecParamDTO;
import com.leyou.item.mapper.SpecParamMapper;
import com.leyou.item.service.SpecParamService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpecParamServiceImpl extends ServiceImpl<SpecParamMapper, SpecParamDTO> implements SpecParamService {
    @Override
    public List<SpecParamDTO> queryParams(Long gid, Long cid3, Boolean searching) {
        List<SpecParamDTO> list = query().eq(gid != null, "group_id", gid)
                .eq(cid3 != null, "category_id", cid3)
                .eq(searching != null, "searching", searching).list();

        return list;
    }
}
